﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>HOME</title>
		<%@ include file="/share/include.jsp" %>
		<!-- <script src="js/jquery.min.js"></script> -->
   		 <meta name="viewport" content="width=device-width, initial-scale=1">
		 <script type="application/x-javascript"> 
			addEventListener("load", function() { 
				setTimeout(hideURLbar, 0); 
			}, false); 
			function hideURLbar(){ 
				window.scrollTo(0,1); 
			} 
		</script>
		<style type="text/css">
			.text-fild-register{
				width:48%;
				margin-right:4%;
				float:left;
			}
			.text-fild-register span{
				display:block;
				/* padding:0 0 0.5em 0; */
			}
			.text-fild-register input[type="text"],.text-fild-register input[type="password"],.text-fild-register input[type="email"]{
				padding:0.8em;
				width:100%;
				outline:none;
				color:#b0aaa0;
				font-family: 'Lora', serif;
				border: 1px solid #DAD8D8;
			}
			.text-fild-register:nth-child(2){
				margin:0;
			}
		</style>
	</head>
	<body>
		<!-- container -->
		<!-- header -->
		<div class="header">
			<%@ include file="/control/jsp/layout/header.jsp" %>
			<!-- /bottom-header -->
		</div>
		<!-- header -->
		<!--- top-nav -->
			<%@ include file="/control/jsp/layout/indexMenu.jsp" %>
		<!--- top-nav -->
		<!-- script-for-nav -->
		<script>
			$(document).ready(function(){
				//表单提交前 验证 表单
		        $("#updateForm").Validform({
					btnSubmit : "#btn_sub",
					tiptype : 3,
					beforeCheck:function(curform){
						 
					 },
					 beforeSubmit:function(data){
						 
					 }
				});
			});
			
			/**
			*设置选择问题
			*/
			function setQuestionType(th){
				var name = $("#quSelect option:selected").val();
				var value = $("#quSelect option:selected").text();
				if(name == 'questionFirst'){
					$('#answer').attr("name","answerFirst");
					$('#question').val(value);
				}else if(name == 'questionSecond'){
					$('#answer').attr("name","answerSecond");
					$('#question').val(value);
				}else{
					$('#answer').attr("name","");
					$('#question').val('');
				}
				$('#question').attr("name",name);
			}
		</script>
			
		<!-- /script-for-nav -->
		<!-- Product-Details-page -->
		<div class="details-page">
			<div class="content details-page">
				<div class="product-details">
					<div class="container">
						<div class="details-left" style="width: 100%;">
							<h3 style="color: orangered;">Password back</h3>
							<c:if test="${findPasswordStatus == '1' }">
							<form id="updateForm" action="${root}/control/layoutController/displayUserFindPassword.do?${cityValue }" method="post">
								<input type="hidden" value="${findPasswordStatus }" id="" name="findPasswordStatus" >
								<div class="text">
									<div class="text-fild-register" style="margin-left: 20%;">
										<!-- <span>密码找回邮箱:</span> -->
										<span>Username:</span>
										<input type="text" class="text" name="userName" value="" placeholder="Your Name here" ajaxurl="${root}/supply/globalController/findCheckUserName.do?tabName=user&msg=业主登录名&status=3&statusName=userStatus&statusRelation=2" maxlength="50" dataType="*1-50">
										<font style="color:green;">Please enter the correct username</font>
									</div>
									<div class="clearfix"> </div>
								</div>
								<input type="submit" class="p-btn" style="margin: 10px;margin-left: 20%;" value="NEXT">
								<input type="button" class="p-btn" style="margin: 10px;" onClick="location.href='${root }/control/layoutController/displayUserLogin.do?${cityValue}'" value="Already registered? Sign In">
							</form>
							</c:if>
							<c:if test="${findPasswordStatus == '2' }">
							<form id="updateForm" action="${root}/control/layoutController/displayUserFindPassword.do?${cityValue }" method="post">
								<input type="hidden" value="${findPasswordStatus }" id="" name="findPasswordStatus" >
								<div class="text">
									<div class="text-fild-register" style="margin-left: 20%;">
										<!-- <span>密码找回邮箱:</span> -->
										<span>Username:</span>
										<input type="text" class="text" name="userName" value="${user.userName }" placeholder="Your Name here" readonly="readonly" maxlength="50" dataType="*1-50">
										<font style="color:green;">Please enter the correct username</font>
									</div>
									<div class="text-fild-register" style="margin-left: 20%;">
										<span>QUESTION:</span>
										<select id="quSelect" name="" class="text" style="width:100%;height: 40px;" nullmsg="Please Choose!" dataType="*" onchange="setQuestionType(this);">
				                        	<option value="">Please Choose!</option>
				                        	<option value="questionFirst">${user.questionFirst }</option>
				                        	<option value="questionSecond">${user.questionSecond }</option>
				                        </select>
				                        <input type="hidden" value="" id="question" name="" >
				                        <font style="color:green;">Please select encryption problem, the problem is used to retrieve the password</font>
									</div>
									<div class="text-fild-register" style="margin-left: 20%;">
										<span>ANSWER:</span>
										<input type="text" class="text" value="" id="answer" name="" placeholder="Your Answer here" maxlength="100" dataType="*1-100">
										<font style="color:red;">${answerStatus }</font>
									</div>
									<div class="clearfix"> </div>
								</div>
								<input type="submit" class="p-btn" style="margin: 10px;margin-left: 20%;" value="NEXT">
								<input type="button" class="p-btn" style="margin: 10px;" onClick="location.href='${root }/control/layoutController/displayUserLogin.do?${cityValue}'" value="Already registered? Sign In">
							</form>
							</c:if>
							<c:if test="${findPasswordStatus == '3' }">
							<form id="updateForm" action="${root }/control/user/userController/findPassword.do" method="post">
								<div class="text">
									<div class="text-fild-register" style="margin-left: 20%;">
										<!-- <span>密码找回邮箱:</span> -->
										<span>Username:</span>
										<input type="text" class="text" name="userName" value="${user.userName }" placeholder="Your Name here" readonly="readonly" ajaxurl="${root}/supply/globalController/findCheckUserName.do?tabName=user&msg=业主登录名&status=3&statusName=userStatus&statusRelation=2" maxlength="50" dataType="*1-50">
										<font style="color:green;">Please enter the correct username</font>
									</div>
									<div class="text-fild-register" style="margin-left: 20%;">
										<!-- <span>密码找回邮箱:</span> -->
										<span>Email:</span>
										<input type="text" class="text" name="email" value="" placeholder="Your Email here" ajaxurl="${root}/supply/globalController/findCheckEmail.do?msg=find&statusName=${user.userName}" maxlength="100" dataType="e">
										<font style="color:green;">Email used to retrieving password, please fill in the correct email</font>
									</div>
									<div class="clearfix"> </div>
								</div>
								<input type="submit" class="p-btn" style="margin: 10px;margin-left: 20%;" value="CONFIRM">
								<input type="button" class="p-btn" style="margin: 10px;" onClick="location.href='${root }/control/layoutController/displayUserLogin.do?${cityValue}'" value="Already registered? Sign In">
							</form>
							</c:if>
						</div>
						<div class="clearfix"> </div>
					</div>
			    </div>
		    </div>
		</div>
		<!-- /Product-Details-page -->
		<!-- footer -->
		<%@ include file="/control/jsp/layout/footer.jsp" %>
</body>
</html>

